#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout);
#define pb push_back

int read(){
	int x = 0,sgn = 1;char ch = getchar();
	for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;
	for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48);
	return x*sgn;
}

const int mod = 998244353;
const int N = 1e5+10;

int rev[N<<2],Wn[N<<2],n;
ll f[N<<2],g[N<<2],A[N<<2],B[N<<2];

ll qp(ll x,int t){ll res=1;for(;t;t>>=1,x=x*x%mod)if(t&1)res=res*x%mod;return res;}

void NTT(ll *f,int len,int on = 1){
	for(int i = 1;i < len;i++) if(i < rev[i]) swap(f[i],f[rev[i]]);
	for(int h = 2;h <= len;h <<= 1){
		int wn = Wn[h];
		for(int i = 0;i < len;i += h){
			ll ww = 1;
			for(int j = i;j < i + h/2;j++){
				ll u = f[j],v = f[j+h/2] * ww % mod; ww = ww * wn % mod;
				f[j] = (u + v) % mod,f[j+h/2] = (u - v + mod) % mod;
			}
		}
	}if(on == -1) {reverse(f+1,f+len); ll invv = qp(len,mod-2); for(int i = 0;i < len;i++) f[i] = f[i] * invv % mod;}
}

void solve(ll *f,ll *g,int l,int r){
	if(l == r) return (f[l] += !l ? 1 : 0) %= mod,void();
	int mid = l+r>>1; solve(f,g,l,mid); int len = 2;for(;len < r-l+1;len<<=1);
	for(int i = l;i <= mid;i++) A[i-l] = f[i]; for(int i = l;i <= r;i++) B[i-l] = g[i-l];
	for(int i = mid-l+1;i < len;i++) A[i] = 0; for(int i = r-l+1;i < len;i++) B[i] = 0;
	for(int i = 1;i < len;i++) rev[i] = rev[i>>1]>>1 | (i & 1 ? len >> 1 : 0);
	NTT(A,len); NTT(B,len); for(int i = 0;i < len;i++) A[i] = A[i] * B[i] % mod;
	
	NTT(A,len,-1); for(int i = mid+1;i <= r;i++) (f[i] += A[i-l]) %= mod;
	solve(f,g,mid+1,r);
}

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in;
	for(int i = 1;i < n;i++) g[i] = in;
	for(int h = 1;h < N<<2;h<<=1) Wn[h] = qp(3,(mod-1)/h);
	solve(f,g,0,n-1);
	for(int i = 0;i < n;i++) printf("%lld ",f[i]%mod);
	return 0;
}

